const path = require('path');
function resolve(dir){   
	return path.join(__dirname,dir)
}
module.exports = {
    productionSourceMap:false,
    publicPath: './',
    chainWebpack: (config) => {  
        
        // 配置别名
        config.resolve.alias        		
        .set('@',resolve('./src'))
        .set('@config',resolve('./src/config'))
        .set('@service',resolve('./src/service'))
        .set('@utils',resolve('./src/utils'))
        .set('@view',resolve('./src/view'))
        .set('@http',resolve('./src/http'))
        .set('@com',resolve('./src/components'))
        .set('@views',resolve('./src/assets/less/views'))
        .set('@common',resolve('./src/assets/less/common'))

        config.module.rule('pug')
            .test(/\.pug$/)
            .use('pug-html-loader')
            .loader('pug-html-loader')
            .end()

    },
}